Forms provide a mechanism for readers of your Web page to submit information in categories. For example, one of the forms in an electronic mail order company would allow the customer to specify name, address, credit card number, telephone, etc. This section explains how you create forms.
Create a form within a Format->Form...
page
Insert a form element Click appropriate button on
into a form form palette:
GNNpress allows even a novice user to create and edit forms within an HTML document, but using the results that are submitted from a form requires a bit more work. The creator of the Web page can design the form, but someone with access to the NaviServer or GNN Hosting Service has to write a program, such as a NaviServer Tcl script or a CGI script, to handle the information passed.
The process that handles the information submitted by the form must be remote, and we cannot help you build it or install it. You must talk to your NaviServer system administrator to have your shell script placed in the server's CGI directory(ies). The Common Gateway Interface (CGI) runs external programs, or gateways, under an information server.
For more information on CGI and forms, look at
CGI scripts might break the server's protection mechanism, because they run on the server and can access files on the server with a uid that is not yours. Therefore installing them is an operation that must be performed carefully.
For more information and examples of CGI scripting, see CGI/1.1 script support of the CERN Server at http://www.w3.org/hypertext/WWW/Daemon/User/CGI/ Overview.html.
Before you spend your weekend learning and writing CGI scripts to handle your form data, it is more useful and easier to use a table in the NaviServer database. Given access to a NaviServer, you can create a searchable table in the NaviServer database and its columns (fields), customized using Tools->Administer Server. The entry form can then be edited, incorporated into another HTML document, and saved elsewhere. The submitted data are then in the NaviServer database where they can be easily searched, ordered, and updated.
A Form has Field Elements that are inserted into a form by clicking the button on the form palette to produce the desired dialogue box. Setting the attributes in the field element dialogue and clicking OK inserts a form element at the cursor position within the form. GNNpress allows you to create eight types of field elements: Text Fields, Radio Buttons, Check boxes, Text Areas, Selection Lists, Picture Fields, Reset buttons, and Submit buttons. Each field element needs to have a Form Tag (you can think of it as analogous to a variable name in a computer program) to identify the field when the results are sent to the form handler. See the Form Palette section.
More than one form may be created within an HTML document, but forms cannot be nested. The Form palette is visible when the cursor is inside the form and disappears when the cursor is outside of the form.
Text, images, links, etc. can be inserted and modified in the form just as in the rest of the page. Form elements can be dragged-and-dropped or cut-and-pasted, but must always be placed within a form.
Assuming there is a CGI shell script installed, here is a description of what you should do.
Form dialogue
Page, after initializing form
More than one form may be created within an HTML document, but forms cannot be nested.